import type { R, TableDataInfo } from '@/api/model/resultModel';
import type { XhljConferenceInfoForm, XhljConferenceInfoQuery, XhljConferenceInfoVo } from '@/api/xhlj/model/conferenceInfoModel';
import { request } from '@/utils/request';

// 查询大会信息列表
export function listConferenceInfo(query?: XhljConferenceInfoQuery) {
  return request.get<TableDataInfo<XhljConferenceInfoVo>>({
    url: '/xhlj/conferenceInfo/list',
    params: query,
  });
}

// 查询大会信息详细
export function getConferenceInfo(conferenceInfoId: number) {
  return request.get<R<XhljConferenceInfoVo>>({
    url: `/xhlj/conferenceInfo/${conferenceInfoId}`,
  });
}

// 新增大会信息
export function addConferenceInfo(data: XhljConferenceInfoForm) {
  return request.post<R<void>>({
    url: '/xhlj/conferenceInfo',
    data,
  });
}

// 修改大会信息
export function updateConferenceInfo(data: XhljConferenceInfoForm) {
  return request.put<R<void>>({
    url: '/xhlj/conferenceInfo',
    data,
  });
}

// 删除大会信息
export function delConferenceInfo(conferenceInfoIds: number | Array<number>) {
  return request.delete<R<void>>({
    url: `/xhlj/conferenceInfo/${conferenceInfoIds}`,
  });
}
